package cn.iocoder.yudao.module.system.controller;

import cn.iocoder.yudao.framework.env.core.util.EnvUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLOutput;

/**
 * @author ext.gouying3
 * @date 2025/7/7
 */

@RestController
@Validated
@Slf4j
public class TestController {

    @Autowired
    private Environment environment;

    @RequestMapping("/test")
    public String test(){
        String NAME = environment.getProperty("spring.cloud.nacos.discovery.metadata.tag");
        System.out.println(NAME);
        return EnvUtils.getTag(environment);
    }
}
